<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>

<script type="text/javascript">
<!--
	$(document).ready(function() {
		$.subscribe('complete', function(event,data) {
			var text = event.originalEvent.request.responseText;
			if(text.search('ui-state-error') == -1) {
				$('#dlgsignin').dialog('close');
				changeHeader();
			}
	   });
	});
//-->
</script>

<sj:tabbedpanel id="signintabs" animate="true" selectedTab="0">
   	<sj:tab id="tab1" target="tone" key="label.buyer"/>
   	<sj:tab id="tab2"  target="ttwo" key="label.seller"/>
	<div id="tone">
		<div id="SignInBuyerResult"></div>
		<s:form id="signInBuyerForm" action="sign-in-authenticate" theme="simple">
			<input type="hidden" id="type" name="type" value="buyer"/>
			<p>
				<label for="email" class="label"><s:text name="email"/>:</label> 
			 	<input type="text" id="email" name="email"/>
			</p>
			<p>
				<label for="password" class="label"><s:text name="password"/>:</label> 
			 	<input type="password" id="password" name="password"/>
			</p>
			<p class="buttonDiv">
				<img id="sib-indicator" src="images/indicator.gif" alt="Loading..." style="display:none"/>
				<sj:submit targets="SignInBuyerResult" button="true" validate="true" indicator="sib-indicator" key="signin" onCompleteTopics="complete"/>
			</p>
		</s:form>
	</div>
	<div id="ttwo">
		<div id="SignInSellerResult"></div>
		<s:form id="signInSellerForm" action="sign-in-authenticate" theme="simple">
			<input type="hidden" id="type" name="type" value="seller"/>
			<p>
				<label for="email" class="label"><s:text name="email"/>:</label> 
			 	<input type="text" id="email" name="email"/>
			</p>
			<p>
				<label for="password" class="label"><s:text name="password"/>:</label> 
			 	<input type="password" id="password" name="password"/>
			</p>
			<p class="buttonDiv">
				<img id="sis-indicator" src="images/indicator.gif" alt="Loading..." style="display:none"/>
				<sj:submit targets="SignInSellerResult" button="true" validate="true" indicator="sis-indicator" key="signin" onCompleteTopics="complete"/>
			</p>
		</s:form>
	</div>
 </sj:tabbedpanel>